package com.xxadmin.usercenter.dao;


import com.github.pagehelper.Page;
import com.xxadmin.usercenter.domain.RoleDetail;
import com.xxadmin.usercenter.dto.RoleDetailQueryDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

@Mapper
@Service
public interface RoleDetailDao {

    /**
     * 新增
     *
     * @param record
     * @return
     */
    int insertSelective(RoleDetail record);

    /**
     * 根据ID查询
     * @param id
     * @return
     */
    RoleDetail selectByPrimaryKey(Integer id);

    /**
     * 修改
     *
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(RoleDetail record);

    /**
     * 查询分页信息
     *
     * @param queryDTO
     * @return
     */
    Page<RoleDetail> selectRoleDetail(RoleDetailQueryDTO queryDTO);

    /**
     * 根据角色名称和渠道编码获取角色信息
     *
     * @param roleName
     * @param channelCode
     * @return
     */
    RoleDetail selectRoleDetailByNameAndChannelCode(@Param("roleName") String roleName,@Param("channelCode") String
            channelCode);
}